|
2020-2021 Sunseeker Telemetry and Lighting System
|
#include "driverlib.h"Go to the source code of this file.
Macros | |
| #define | SLAVE_ADDRESS 0x48 |
| #define | RXCOUNT 0x05 |
| #define | CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ 1000 |
| #define | CS_SMCLK_FLLREF_RATIO 30 |
Functions | |
| void | main (void) |
| void | USCIB0_ISR (void) |
Variables | |
| uint8_t | RXData |
| #define CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ 1000 |
Definition at line 91 of file eusci_b_i2c_ex1_masterRxMultiple.c.
| #define CS_SMCLK_FLLREF_RATIO 30 |
Definition at line 98 of file eusci_b_i2c_ex1_masterRxMultiple.c.
| #define RXCOUNT 0x05 |
Definition at line 84 of file eusci_b_i2c_ex1_masterRxMultiple.c.
| #define SLAVE_ADDRESS 0x48 |
MSP430FR4133 Demo - USCI_B0 I2C Master RX multiple bytes from MSP430 Slave
Description: This demo connects two MSP430's via the I2C bus. The master reads 5 bytes from the slave. This is the MASTER CODE. The data from the slave transmitter begins at 0 and increments with each transfer. The USCI_B0 RX interrupt is used to know when new data has been received. ACLK = n/a, MCLK = SMCLK = BRCLK = DCO = ~1MHz
/|\ /|\
MSP430FR4133 10k 10k MSP430FR4133
slave | | master
----------------- | | -----------------
-|XIN P5.2/UCB0SDA|<-|----+->|P5.2/UCB0SDA XIN|-
| | | | | 32kHz
-|XOUT | | | XOUT|-
| P5.3/UCB0SCL|<-+------>|P5.3/UCB0SCL |
| | | P1.0|--> LED
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
Definition at line 77 of file eusci_b_i2c_ex1_masterRxMultiple.c.
| void main | ( | void | ) |
Definition at line 101 of file eusci_b_i2c_ex1_masterRxMultiple.c.
References __delay_cycles(), CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ, CS_SMCLK_FLLREF_RATIO, param, RXCOUNT, and SLAVE_ADDRESS.
| void USCIB0_ISR | ( | void | ) |
Definition at line 214 of file eusci_b_i2c_ex1_masterRxMultiple.c.
References __bic_SR_register_on_exit(), RXCOUNT, and RXData.
| uint8_t RXData |
Definition at line 100 of file eusci_b_i2c_ex1_masterRxMultiple.c.